import datetime
errlist = ['1212121212121212|11|20\n', '1212121212121232|11|20\n', '1212121212121233|11|20\n', '4980005321502234|01|21']
succlist = []
print('查询操作完毕！errlist', errlist)
print('查询操作完毕！succlist', succlist)
datetimenowTime = datetime.datetime.now().strftime('%Y-%m-%d-%H-%M-%S')  # 现在
# begin_date = datetime.datetime.strptime(datetimenowTime, "%Y-%m-%d%H:%M:%S")
filename = "succ" + datetimenowTime + ".txt"
badfilename = "bad" + datetimenowTime + ".txt"
f1 = open('exp/' + filename, 'w')
for a in succlist:
    f1.write(a)
f1.close()
f1 = open('exp/' + badfilename, 'w')
for a in errlist:
    f1.write(a)
f1.close()